<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="dist/vue.js"></script>
</head>
<body>
    <div id="app">
        {{ msg }}(
        {{ reverse }} {{ reverse }} {{ reverse }}
        {{ reverseMth() }} {{ reverseMth() }} {{ reverseMth() }}
    </div>
</body>
<script>
    const vm = new Vue({
        el: '#app',
        data: {
            msg: '我是计算属性的相关的内容'
        },
        computed: {
            reverse() {
                console.log('computed');
                return this.msg.split('').reverse().join('');
            }
        },
        methods: {
            reverseMth() {
                console.log('methods');
                return this.msg.split('').reverse().join('');
            }
        }
    })
</script>
</html>

